<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位的居中显示</title>
    <style>
        a{
            text-decoration: none;
        }
        .box{
            position: relative;
            width: 800px;
            height: 400px;
            background-color: rgb(75, 66, 66);
            position: absolute;
            top: 30%;
            left: 50%;
            transform: translate(-50%,-50%);
        }
        div img{
            width: 100%;
            height: 100%;
            background-color: rgb(255, 0, 0);
        }
        .left{
            z-index: 100;
            position: absolute;
            top: 50%;
            left: 3%;
            transform: translate(-50%,-50%);
            width: 20px;
            height: 30px;
            background-color: rgb(255, 255, 255 ,.8);
        }
        .right{
            z-index: 100;
            position: absolute;
            top: 50%;
            left: 97%;
            transform: translate(-50%,-50%);
            width: 20px;
            height: 30px;
            background-color: rgb(255, 255, 255 ,.8);
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="img">
        <!-- <img src="https://img.youpin.mi-img.com/ferriswheel/46dfafbe_a492_4593_9766_b5c2de0de890.jpeg"
            alt="产品图片">  -->
        </div>
        <div class="left">
            <a href="">
                <
            </a>
        </div>
        <div class="center-list">2</div>
        <div class="right">
            <a href="">
                >
            </a>
        </div>
    </div>
    
</body>
</html>